package com.xfpp.javaDemo.test;

/**
 * @package   com.xfpp.javaDemo.test
 * @file SingletonTest.java
 * @author   yanwl
 * @date 2016年10月8日
 * @version V 1.0
 */
public class Singleton {
	public static Singleton singleton = new Singleton();    
	public static int a;         
	public static int b = 4;           
	private Singleton() {          
		super();            
		a++;            
		b++;         
	}   
	public static Singleton GetInstence() { 
	   return singleton;        
	}    
	
	public static void main(String[] args) {
		Singleton singleton = Singleton.GetInstence();
		System.out.println("a:"+singleton.a);
		System.out.println("b:"+singleton.b);
	}
}
